import 'package:awesome_dialog/awesome_dialog.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

class DialogUtils {
  /// 清理画布 提示框
  static void question(Function()? cancel, Function()? ok) {
    _awesomeDialog(cancel, ok, '清理画布', null, 400.r);
  }

  static void _awesomeDialog(
    Function()? cancel,
    Function()? ok,
    String? title,
    String? desc,
    double? width,
  ) {
    AwesomeDialog(
      context: Get.context!,
      dialogType: DialogType.question,
      animType: AnimType.scale,
      title: title,
      desc: desc,
      btnCancelOnPress: cancel,
      btnOkOnPress: ok,
      width: width,
    ).show();
  }
}
